package com.lei2j.decorator;

/**
 * Created by lei2j on 2019/1/13.
 */
public class Whip extends CondimentDecorator {

    private Beverage1 beverage1;

    public Whip(Beverage1 beverage1) {
        this.beverage1 = beverage1;
    }

    @Override
    public String getDescription() {
        return beverage1.getDescription()+" whip";
    }

    @Override
    public double cost() {
        return 4.5*beverage1.getSize()+beverage1.cost();
    }

    @Override
    public int getSize() {
        return beverage1.getSize();
    }
}
